Skip to content

Conversation

@ckhardin
Copy link
Contributor

@ckhardin ckhardin commented Nov 8, 2025

Extend the lan9250 driver to support using a local administered unicast random mac address during init. This follows the device tree settings for zephyr_random_mac_address from other ethernet drivers for the added support.

Copy link
Member

@dsseng dsseng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Please find my suggestions below

@ckhardin ckhardin force-pushed the ckhardin/add-random-mac-to-lan9250 branch from 659344d to c5e45ea Compare November 9, 2025 02:43
@ckhardin
Copy link
Contributor Author

ckhardin commented Nov 9, 2025

interesting - not sure how the msg wait all stack issues relate to this change - so, need to see if that failure is upstream or in this PR alone?

@dsseng
Copy link
Member

dsseng commented Nov 9, 2025

interesting - not sure how the msg wait all stack issues relate to this change - so, need to see if that failure is upstream or in this PR alone?

Looks like a flaky test, unlikely to be caused by this PR. Someone with the CI access rights will restart the failed twister run and let you know if it is somehow relevant

@ckhardin ckhardin force-pushed the ckhardin/add-random-mac-to-lan9250 branch from c5e45ea to fdaa24c Compare November 10, 2025 20:15

gpio_pin_interrupt_configure_dt(&config->interrupt, GPIO_INT_EDGE_TO_ACTIVE);

if (config->reset.port) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (config->reset.port) {
if (config->reset.port != NULL) {

the condition has to be a boolean. See coding guidelines
rule 85

The controlling expression of an if statement and the controlling expression of an iteration-statement shall have essentially Boolean type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all the ethernet drivers are updated to the coding rules - this is a cut and paste from eth_w5500.c, so updated it for this patch.

@ckhardin ckhardin force-pushed the ckhardin/add-random-mac-to-lan9250 branch 2 times, most recently from 8e34711 to 1c940f7 Compare November 11, 2025 22:06
Extend the lan9250 driver to support using a local administered
unicast random mac address during init. This follows the device tree
settings for zephyr_random_mac_address from other ethernet drivers
for the added support.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
The reset gpio field was in the config structure but was not coded
into the initialization path. So, add the appropriate code to handle
the gpio setup when it is defined in the device tree.

Signed-off-by: Charles Hardin <ckhardin@gmail.com>
@ckhardin ckhardin force-pushed the ckhardin/add-random-mac-to-lan9250 branch from 1c940f7 to 93dac9c Compare November 18, 2025 01:29
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants